3.265 \(\int \sqrt{a+a \tan ^2(c+d x)} \, dx\)

Optimal. Leaf size=36 \[ \frac{\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a \sec ^2(c+d x)}}\right )}{d} \]

[Out]

(Sqrt[a]*ArcTanh[(Sqrt[a]*Tan[c + d*x])/Sqrt[a*Sec[c + d*x]^2]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0349328, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3657, 4122, 217, 206} \[ \frac{\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a \sec ^2(c+d x)}}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Tan[c + d*x]^2],x]

[Out]

(Sqrt[a]*ArcTanh[(Sqrt[a]*Tan[c + d*x])/Sqrt[a*Sec[c + d*x]^2]])/d

Rule 3657

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 4122

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(b*ff)
/f, Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \sqrt{a+a \tan ^2(c+d x)} \, dx &=\int \sqrt{a \sec ^2(c+d x)} \, dx\\ &=\frac{a \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+a x^2}} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac{a \operatorname{Subst}\left (\int \frac{1}{1-a x^2} \, dx,x,\frac{\tan (c+d x)}{\sqrt{a \sec ^2(c+d x)}}\right )}{d}\\ &=\frac{\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a \sec ^2(c+d x)}}\right )}{d}\\ \end{align*}

Mathematica [A]  time = 0.0314185, size = 31, normalized size = 0.86 \[ \frac{\cos (c+d x) \sqrt{a \sec ^2(c+d x)} \tanh ^{-1}(\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Tan[c + d*x]^2],x]

[Out]

(ArcTanh[Sin[c + d*x]]*Cos[c + d*x]*Sqrt[a*Sec[c + d*x]^2])/d

________________________________________________________________________________________

Maple [A]  time = 0.065, size = 34, normalized size = 0.9 \begin{align*}{\frac{1}{d}\sqrt{a}\ln \left ( \sqrt{a}\tan \left ( dx+c \right ) +\sqrt{a+a \left ( \tan \left ( dx+c \right ) \right ) ^{2}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*tan(d*x+c)^2)^(1/2),x)

[Out]

1/d*a^(1/2)*ln(a^(1/2)*tan(d*x+c)+(a+a*tan(d*x+c)^2)^(1/2))

________________________________________________________________________________________

Maxima [B]  time = 1.6991, size = 88, normalized size = 2.44 \begin{align*} \frac{\sqrt{a}{\left (\log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) + 1\right ) - \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) + 1\right )\right )}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(a)*(log(cos(d*x + c)^2 + sin(d*x + c)^2 + 2*sin(d*x + c) + 1) - log(cos(d*x + c)^2 + sin(d*x + c)^2 -
 2*sin(d*x + c) + 1))/d

________________________________________________________________________________________

Fricas [A]  time = 1.37526, size = 234, normalized size = 6.5 \begin{align*} \left [\frac{\sqrt{a} \log \left (2 \, a \tan \left (d x + c\right )^{2} + 2 \, \sqrt{a \tan \left (d x + c\right )^{2} + a} \sqrt{a} \tan \left (d x + c\right ) + a\right )}{2 \, d}, -\frac{\sqrt{-a} \arctan \left (\frac{\sqrt{a \tan \left (d x + c\right )^{2} + a} \sqrt{-a}}{a \tan \left (d x + c\right )}\right )}{d}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^(1/2),x, algorithm="fricas")

[Out]

[1/2*sqrt(a)*log(2*a*tan(d*x + c)^2 + 2*sqrt(a*tan(d*x + c)^2 + a)*sqrt(a)*tan(d*x + c) + a)/d, -sqrt(-a)*arct
an(sqrt(a*tan(d*x + c)^2 + a)*sqrt(-a)/(a*tan(d*x + c)))/d]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \tan ^{2}{\left (c + d x \right )} + a}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)**2)**(1/2),x)

[Out]

Integral(sqrt(a*tan(c + d*x)**2 + a), x)

________________________________________________________________________________________

Giac [B]  time = 1.43536, size = 89, normalized size = 2.47 \begin{align*} -\frac{{\left (\log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 1\right ) - \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 1\right )\right )} \sqrt{a}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^(1/2),x, algorithm="giac")

[Out]

-(log(abs(tan(1/2*d*x + 1/2*c) + 1))*sgn(tan(1/2*d*x + 1/2*c)^4 - 1) - log(abs(tan(1/2*d*x + 1/2*c) - 1))*sgn(
tan(1/2*d*x + 1/2*c)^4 - 1))*sqrt(a)/d